export default {
	data() {
		return {
			orderId: '',
			expressName: '',
			traces: [],
			orderNum: '',
			type: '' //1普通商品  2盲盒
		};
	},
	onLoad(options) {
		this.orderId = options.orderId ? options.orderId : ''
		this.type = options.type
		this.getLogistics()
	},
	methods: {
		async getLogistics() {
			var res = await this.$get('server/index/kdinfo', {
				id: this.orderId,
				type: this.type
			});
			if (res.errcode != 0) {
				this.$toast(res.errmsg);
				return;
			}
			this.expressName = res.express_name
			this.traces = res.result.Traces
			this.orderNum = res.result.LogisticCode
		}
	}
}
